import requests
import json
import urllib3
urllib3.disable_warnings()

# 第十期url，其他暂时未知
url = 'https://qczj.h5yunban.com/qczj-youth-learning/cgi-bin/user-api/course/join?accessToken=6D70BA81-7EA5-41F1-91FF-C0F3B27623A3'
def daka(cardNo):
    data={
    "cardNo" : str(cardNo),
    "course" : "C0107",
    "nid" : "N0002000500100003",
    "subOrg" : None,
    }
    response = requests.post(url=url,data=json.dumps(data),timeout=30,verify=False)
    if response.status_code==200:
        print(f"学习成功:{cardNo}")
    else:
        print(f"学习失败:{cardNo}")

    print(response.json())

cardNo_list=[
    31901085,
]

cardNo_list = list(range(31901064,31901095))
# print(cardNo_list)

for i in cardNo_list:
    daka(i)